<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>

<script type="text/javascript">
$(document).ready(function() {

	$(".actionViewChannel").click(function() {
		var uri = $(this).attr('href'); 
		if (uri==='') {
			alert('ไม่มีข้อมูลอัลบัมเพลง');
		}
		else {
			window.location = uri;
		}
		return false;
	});

	$(".topCont a").click(function() {
//		var uri = ISS.lang.getBasePath()+'index.php/top_order/show/ajax_channel_play/'+$(this).attr('value');
//		ISS.Ajax.Caller.request(uri, null);
		alert("Goto channel id = " + $(this).attr('value'));
	});
	
	$(".botCont a.left").click(function() {
		var uri = ISS.lang.getBasePath()+'index.php/top_order/show/ajax_channel_play/'+$(this).attr('value');
		ISS.Ajax.Caller.request(uri, null);
	});

	$(".botCont a.right").click(function() {
		//var uri = ISS.lang.getBasePath()+'index.php/top_order/show/ajax_channel_play/'+$(this).attr('value');
		//ISS.Ajax.Caller.request(uri, null);
		alert("Goto channel id = " + $(this).attr('value'));
	});
		
}); 
</script>

    <div id="centrCol">
      <div class="banr"><img src="<?php echo url::base();?>media/images/main_banr.jpg" width="275" height="182" border="0" alt="" /></div>
      <div><h1>สถานีเพลงใหม่เปิดบริการแล้ว</h1></div>
      <div id="albmBlock">
      	<?php 
        	foreach ($new_channels as $channel) {
        		echo '<div class="albmBox">';
        		echo '	<div class="topCont">';
        		echo '		<h1><img src="'. $channel['channel_picture'] .'" border="0" alt="'. $channel['title'] .'" height="48"/></h1>';
        		echo '		<a href="#" class="headings" value="'. $channel['owner_id'] .'/'. $channel['id'] .'">'. $channel['title'] .' <span>'. $channel['created'] .'</span></a>';
        		echo '  </div>';		
        		echo '	<div class="botCont"> <a class="left" href="#" value="'. $channel['owner_id'] .'/'. $channel['id'] .'">play</a> <a class="right" href="#" value="'. $channel['owner_id'] .'/'. $channel['id'] .'">view</a> </div>';
        		echo '</div>';
        	} 
        ?>
      </div>
    </div>